Brief Description | |
---|---|
File: \examples\Processing\Shading\Shading2D\PixelwiseFFC_RAMLUT\2D_FFC_RAMLUT.vad |
![]() |
Default Platform: iF-CXP12-Q |
|
Short Description The example shows the implementation of a 2D shading correction. Correction values are stored in frame grabber RAM (operator: RamLUT). The applet performs a high precision offset and gain correction. The design is implemented for the imaFlex CXP12 platform but can easily be tranferred and adapted to the microEnable5 frame grabbers. |
Flat Field Correction (FFC) is a method to correct and compensate color and brightness inhomogeneities e.g. due to non uniform
light conditions, sensor inhomogeities,...,
in an image.
To correct the pixel values I of an image the acquisition of one or of a sequence of images with no light falling onto the
camera sensor (dark frames) and of one or of a sequence
of bright images is necessary. In the bright images no structures are visible (homogeneous plane e.g. piece of paper) and
the maximum brightness values are typically about 70% of
the saturation value. If multiple dark and bright frames are acquired an average dark and bright frame is calculated from
the image sequence.
For the correction of the inhomogenuous image two values, named gain and offset, for each pixel can be calculated from the
dark and bright frame.
The corrected pixel value can then be calculated as:
The offset values refer to the pixel values of the dark frame. The gain values can be calculated according to: